package com.ruoyi.community.service.impl;

import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.community.domain.CmtDisData;
import com.ruoyi.community.mapper.CmtDisDataMapper;
import com.ruoyi.community.service.ICmtDisDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CmtDisDataServiceImpl implements ICmtDisDataService {
    /**
     * 如果调用其他模块，注入service;
     */
    @Autowired
    private CmtDisDataMapper cmtDisDataMapper;

    @Override
    public List<CmtDisData> selectDisList(CmtDisData dis) {
        return cmtDisDataMapper.selectDisList(dis);
    }

    @Override
    public int insertDis(CmtDisData dis) {
        return cmtDisDataMapper.insertDis(dis);
    }




    /**
     * 修改保存当日疫情情况信息
     *
     * @param dis 当日疫情情况信息
     * @return 结果
     */
    @Override
    public int updateDis(CmtDisData dis) {
        return cmtDisDataMapper.updateDis(dis);
    }


    /**
     * 通过当日疫情情况ID查询当日疫情情况信息
     *
     * @param disCode 当日疫情情况ID
     * @return 角色对象信息
     */
    @Override
    public CmtDisData selectDisByCode(Long disCode) {
        return cmtDisDataMapper.selectDisByCode(disCode);
    }


    /**
     * 删除当日疫情情况信息
     *
     * @param disCode 当日疫情情况ID
     * @return 结果
     */
    @Override
    public int deleteDisByCode(Long disCode) {
        return cmtDisDataMapper.deleteDisByCode(disCode);
    }


    /**
     * 批量删除当日疫情情况信息
     *
     * @param disCodes 需要删除的当日疫情情况ID
     * @return 结果
     * @throws Exception 异常
     */
    @Override
    public int deleteDisByCodes(Long[] disCodes) {

        return cmtDisDataMapper.deleteDisByCodes(disCodes);
    }

    @Override
    public List<CmtDisData> selectDisAll() {
        return cmtDisDataMapper.selectDisAll();
    }

    @Override
    public List<CmtDisData> selectDisDataByPeople(String disPeople) {
        return cmtDisDataMapper.selectDisDataByPeople(disPeople);
    }


}
